package org.jsola.contract.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.contract.dto.ContractGroupAddDTO;
import org.jsola.contract.dto.ContractGroupUpdateDTO;
import org.jsola.contract.query.ContractGroupQuery;
import org.jsola.contract.vo.ContractGroupListVO;
import org.jsola.contract.vo.ContractGroupVO;
import org.jsola.core.Page;
import org.jsola.core.Result;

import java.util.List;

/**
 * 合同类型分组
 *
 * @author JanusMix
 */
@Api(tags = "contract-合同类型分组")
public interface IContractGroupControllerAPI {

    /**
     * 新增合同类型分组
     * @param contractGroupAddDTO 合同类型分组新增实体
     * @return 合同类型分组展示对象
     */
    @ApiOperation(value = "新增合同类型分组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "contractGroupAddDTO", dataType = "ContractGroupAddDTO", value = "新增合同类型分组", paramType = "body")
    })
    Result<ContractGroupVO> save(ContractGroupAddDTO contractGroupAddDTO);


    /**
     * 修改合同类型分组
     * @param contractGroupUpdateDTO 合同类型分组
     * @return 更新数量
     */
    @ApiOperation(value = "修改合同类型分组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "contractGroupUpdateDTO", dataType = "ContractGroupUpdateDTO", value = "修改合同类型分组", paramType = "body")
    })
    Result<Integer> update(ContractGroupUpdateDTO contractGroupUpdateDTO);




    /**
     * 删除单个合同类型分组，彻底删除
     * @param contractGroupId 合同类型分组id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个合同类型分组，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "contractGroupId", dataType = "Long", value = "合同类型分组id", paramType = "path")
    })
    Result<Integer> delete(Long contractGroupId);


    /**
     * 批量删除合同类型分组，彻底删除
     * @param contractGroupIds 合同类型分组id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除合同类型分组，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "contractGroupIds", dataType = "Long[]", value = "合同类型分组id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(Long[] contractGroupIds);


    /**
     * 根据合同类型分组id查询合同类型分组详情
     * @param contractGroupId 合同类型分组id
     * @return 合同类型分组详情
     */
    @ApiOperation(value="根据合同类型分组id查询合同类型分组详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "contractGroupId", dataType = "Long", value = "合同类型分组id", paramType = "path")
    })
    Result<ContractGroupVO> findById(Long contractGroupId);


    /**
     * 查询合同类型分组
     * @param contractGroupQuery 合同类型分组查询参数
     * @return page
     */
    @ApiOperation(value="查询合同类型分组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "contractGroupQuery", dataType = "ContractGroupQuery", value = "合同类型分组查询参数", paramType = "query")
    })
    Result<List<ContractGroupListVO>> listAll(ContractGroupQuery contractGroupQuery);


     /**
     * 分页查询合同类型分组
     * @param contractGroupQuery 合同类型分组查询参数
     * @return page
     */
    @ApiOperation(value="分页查询合同类型分组")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "contractGroupQuery", dataType = "ContractGroupQuery", value = "合同类型分组查询参数", paramType = "query")
    })
    Result<Page<ContractGroupListVO>> page(ContractGroupQuery contractGroupQuery);


}

